package com.cplatform.movie.back.order.service;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cplatform.dbhelp.DbHelper;
import com.cplatform.movie.back.order.dao.LogisticsDao;
import com.cplatform.movie.back.order.entity.Logistics;

@Service
public class LogisticsService {
	@Autowired
	private LogisticsDao logisticsDao;
	@Autowired
	private DbHelper dbHelper;

	/**
	 * @throws SQLException 
	 * @Title: 根据订单编号，获取物流信息 <br>
	 * @param orderId
	 * @return
	 * @throws
	 */
	public Logistics findByOrderId(Long orderId) throws SQLException {
		String sql = "select * from t_small_logistics t where t.order_id=?";
		return dbHelper.getBean(sql, Logistics.class, new Object[] { orderId });
	}
}
